package com.hxkj.client.service;

import com.hxkj.domain.po.FreeMarker;
import com.hxkj.domain.po.WebsiteAddr;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @InterfaceName WebsiteAddrServiceClient
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/8/7 14:20
 * @Version 1.0
 */
@FeignClient(name = "cms-management")
public interface WebsiteAddrServiceClient {


    /**
     * url规则配置  带分页
     *
     * @param
     * @throws Exception
     */
    @RequestMapping(value = "/website/getpages", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultPageStruct<WebsiteAddr> getPages(@RequestBody ParameterDataStruct<WebsiteAddr> parameterDataStruct) throws Exception;


    /**
     * url规则配置  不带分页
     *
     * @param
     * @throws Exception
     */
    @RequestMapping(value = "/website/getlist", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public List<WebsiteAddr> getList(@RequestBody WebsiteAddr websiteAddr) throws Exception;

    /**
     * 获取单条配置信息
     */
    @RequestMapping(value = "/website/get", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultDataStruct<WebsiteAddr> get(@RequestBody WebsiteAddr websiteAddr) throws Exception;

    /**
     * 修改单条配置信息
     */
    @RequestMapping(value = "/website/modify", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct modifyWebsite(@RequestBody WebsiteAddr websiteAddr) throws Exception;

    /**
     * 删除配置信息(可删除多条)
     */
    @RequestMapping(value = "/website/remove", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct removeWebsite(@RequestBody WebsiteAddr websiteAddr) throws Exception;

    /**
     * 增加配置信息
     */
    @RequestMapping(value = "/website/save", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct saveWebsite(@RequestBody WebsiteAddr websiteAddr) throws Exception;

}
